<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function trophyHtml(){
        $userId = I("userId");
        $phone = I("phone");
        $error = "";
        $userInfo = M('User')->where(array('us_phone'=>$phone))->find();
        if(empty($userInfo)&&$phone!=null){
            $error = "查询失败，原因：账号不存在!";
            $this->assign("error",$error);
        }
        $this->assign("us_trophy_num",$userInfo['us_trophy_num']);
        $this->display();
    }
    public function index(){
    	/*$url = "http://localhost/tb_xiaoshangchengphp/Order/applyOrder";
    	$data = array(
    		'userId'=>2,
    		'version'=>'2.5',
    		'account'=>'asd',
    		'password'=>'asdasd',
    		'isVip'=>0,
    	);
    	dump(post($url,$data));*/

    	/*$url = "http://localhost/tb_xiaoshangchengphp/Order/getOrderSchedule";
    	$data = array(
    		'orderId'=>12,
    	);
    	dump(post($url,$data));*/

    	/*$url = "http://localhost/tb_xiaoshangchengphp/Order/getParams";
    	$data = array(
    		'orderId'=>12,
    	);
    	dump(post($url,$data));*/

    	/*$url = "http://localhost/tb_xiaoshangchengphp/Order/updateOrderParams";
    	$data = array(
    		'orderId'=>12,
    	);
    	dump(post($url,$data));*/

        /*$url = "http://localhost/tb_xiaoshangchengphp/Public/getPayment";
        $data = array(
            'orderId'=>12,
        );
        dump(post($url,$data));*/

        /*$url = "http://localhost/tb_xiaoshangchengphp/Order/checkStock";
        $data = array(
        );
        dump(post($url,$data));*/

        /*$url = "http://localhost/tb_xiaoshangchengphp/User/recharge";
        $data = array(
            'userId'=>'2',
            'cradNumber'=>'BGkaT3WRBNK'
        );
        dump(post($url,$data));*/

        /*$url = "http://localhost/tb_xiaoshangchengphp/DeviceApi/endingOrder";
        $data = array(
            'deviceId'=>'1',
            'msg'=>'自动结束'
        );
        dump(post($url,$data));*/

       /* $url = "http://localhost/tb_xiaoshangchengphp/Public/getAppVersion";
        $data = array(
        );
        echo post($url,$data);*/

       /* $url = "http://112.74.49.250/tb_xiaoshangchengphp/Public/login";
        $data = array(
            'phone'=>'18080404602',
            'password'=>'123456'
        );
        dump(json_decode(post($url,$data),true));*/

        /*$url = "http://localhost/tb_xiaoshangchengphp/Tribe/auditingApplyTribe";
        $data = array(
            'userId'=>'2',
            'apply_user'=>'3465',
            'status'=>2
        );echo post($url,$data);*/
       /* $url = "http://localhost/tb_xiaoshangchengphp/Tribe/editTribeMemberLevel";
        $data = array(
            'userId'=>'2',
            'memberId'=>'3465',
            'level'=>'1'
        );echo post($url,$data);*/
        /*$url = "http://localhost/tb_xiaoshangchengphp/Tribe/quitTribe";
        $data = array(
            'userId'=>'3',
        );echo post($url,$data);*/
/*        $url = "http://localhost/tb_xiaoshangchengphp/DeviceApi/refTrophy";
        $data = array(
            'beginTime'=>'1503839410',
        );echo post($url,$data);*/
        echo 'Hello world!';
    }
}